package se.webbzon.boltzmann.editor.h3ds;

import java.util.HashMap;
import java.util.Map;

public class H3DSTextureMap {
	
	private final Map<String,String> textureMap;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public H3DSTextureMap() {
		textureMap = new HashMap<String,String>();
		textureMap.put("sp_terrain_stone_01", "terrain_stone_stone_01");
		textureMap.put("sp_terrain_stone_02", "terrain_stone_stone_02");
		textureMap.put("sp_terrain_stone_03", "terrain_stone_stone_03");
		textureMap.put("sp_terrain_stone_04", "terrain_stone_stone_04");
		textureMap.put("sp_terrain_stone_05", "terrain_stone_stone_05");
		textureMap.put("sp_terrain_stone_06", "terrain_stone_stone_06");
		
		textureMap.put("sp_terrain_floor_01", "terrain_floor_floor_01");
		textureMap.put("sp_terrain_floor_02", "terrain_floor_floor_01");
		
		textureMap.put("sp_terrain_grass_01", "terrain_grass_grass_01");
		textureMap.put("sp_terrain_grass_02", "terrain_grass_grass_02");
		
		textureMap.put("sp_road_dirt_01", "terrain_road_road_01");
		textureMap.put("sp_road_dirt_02", "terrain_road_road_02");
		
		textureMap.put("sp_terrain_wood_01", "terrain_wood_wood_01");
		textureMap.put("sp_terrain_wood_02", "terrain_wood_wood_02");
		
		textureMap.put("sp_terrain_dirt_01", "terrain_dirt_dirt_01");
		
		textureMap.put("sp_box_00", "terrain_building_box_01");
		textureMap.put("sp_box_01", "terrain_building_box_02");
		
		textureMap.put("sp_weeds_50", "terrain_nature_weeds_01");
		textureMap.put("sp_weeds_51", "terrain_nature_weeds_02");
		textureMap.put("sp_weeds_52", "terrain_nature_weeds_03");
		textureMap.put("sp_weeds_53", "terrain_nature_weeds_04");
		
		textureMap.put("sp_bush_01", "terrain_nature_bush_01");
		textureMap.put("sp_bush_02", "terrain_nature_bush_02");
		textureMap.put("sp_bush_03", "terrain_nature_bush_03");
		textureMap.put("sp_bush_04", "terrain_nature_bush_04");
		textureMap.put("sp_bush_05", "terrain_nature_bush_05");
		
		textureMap.put("sp_cactus_01", "terrain_nature_cactus_01");
		textureMap.put("sp_cactus_02", "terrain_nature_cactus_02");
		textureMap.put("sp_cactus_03", "terrain_nature_cactus_03");
		textureMap.put("sp_cactus_04", "terrain_nature_cactus_04");
		textureMap.put("sp_cactus_05", "terrain_nature_cactus_05");
		
		textureMap.put("sp_tree_01", "terrain_nature_tree_01");
		textureMap.put("sp_tree_02", "terrain_nature_tree_02");
		textureMap.put("sp_tree_03", "terrain_nature_tree_03");
		textureMap.put("sp_tree_04", "terrain_nature_tree_04");
		textureMap.put("sp_tree_05", "terrain_nature_tree_05");
		textureMap.put("sp_tree_06", "terrain_nature_tree_06");
		
		textureMap.put("sp_terrain_water_01", "terrain_water_water");
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the texture name associated with the given H3DS texture name. **/
	public String get(String h3dsTextureName) {
		String textureName = textureMap.get(h3dsTextureName);
		if (textureName == null)
			return "misc_unknown";
		else
			return textureName;
	}

}
